package com.threeman.api.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/api")
public class UserDataController {
	
	@RequestMapping(value="/users/{username}", method=RequestMethod.GET )
	public @ResponseBody String getUserData(@PathVariable String username, Model model)
	{
		
		return "{ username: " + username + " }";
	}
	
	
	@RequestMapping(value="/**")
	public @ResponseBody String apiTester()
	{
		return "errorr";
	}
}
